package com.applancer.parser;

import org.json.JSONObject;

import com.applancer.model.CommentModel;
import com.applancer.model.GeneralModel;

public class CommentParser extends GeneralParser {

	@Override
	public GeneralModel parseModel(JSONObject obj) {
		CommentModel model = new CommentModel();

		try {
			model.setId(obj.getString("Id"));
		} catch (Exception e) {
		}

		try {
			model.setAuthorName(obj.getString("AuthorName"));

		} catch (Exception e) {
		}

		try {
			model.setAuthorEmail(obj.getString("AuthorEmail"));
		} catch (Exception e) {
		}

		try {
			model.setDate(obj.getString("Date"));
		} catch (Exception e) {
		}

		try {
			model.setContent(obj.getString("Content"));
		} catch (Exception e) {
		}

		return model;
	}
}
